import React from 'react';
import i18next from  './i18n/index';
import { useTranslation } from 'react-i18next';



const Index = () => {
  const { t } = useTranslation()
  return ( <div>
    <button onClick={() => i18next.changeLanguage('zh')}>中文</button>
    <button onClick={() => i18next.changeLanguage('en')}>英文</button>
    <div>  { t('title')}</div>
  </div> );
}
 
export default Index;